package cn.hznc.controller.init;

import cn.hznc.aspect.BusinessType;
import cn.hznc.aspect.Log;
import cn.hznc.controller.service.init.InitService;
import cn.hznc.domain.request.life.ToolUsageReportReq;
import cn.hznc.domain.response.ResponseBody;
import cn.hznc.exception.ToolScheduleException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：Administrator
 * @Date：2023/12/1 15:32
 */
@RestController
@Slf4j
@CrossOrigin(origins = "*", maxAge = 3600)
@RequestMapping("/init")
public class InitController{

    @Autowired
    private InitService initService;


    @RequestMapping(value = "/resetSystemData", method = RequestMethod.GET)
    //@Log(title = "重置系统数据" , businessType = BusinessType.OTHER)
    public ResponseBody resetSystemData() {
        initService.resetStock();
        return ResponseBody.success();
    }

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    //@Log(title = "重置系统数据" , businessType = BusinessType.OTHER)
    public ResponseBody test() {
        initService.test();
        return ResponseBody.success();
    }

//    @RequestMapping(value = "/test1", method = RequestMethod.GET)
//    public ResponseBody test1() {
//        initService.test1();
//        return ResponseBody.success();
//    }
}
